import java.util.Scanner;
public class CalculatorDemo {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        System.out.println("***欢迎使用计算器***");
        here:while(true){
            System.out.println("使用第一种计算器请按1；使用第二种计算器请按2；退出请按0");
            int ni=scan.nextInt();
            switch(ni){
                case 0:break here;
                case 1:
                    Calculator calculator=new Calculator();
                    calculator.func();
                    break;
                case 2:
                    Calculator2 calculator2=new Calculator2();
                    calculator2.func2();
                    break;
                default:
                    System.out.println("输入有误");
            }
        }
        scan.close();
    }
}
